using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class SoundManager : MonoBehaviour
{
    public static AudioSource audioSrc;
    public static AudioClip jump;
    public static AudioClip run;
    public static AudioClip attack;
    public static AudioClip beHit;
    public static AudioClip pickCoin;
    public static AudioClip clickButton;
    public static AudioClip death;
    public static AudioClip enemyDeath;
    // Start is called before the first frame update
    void Start()
    {
        audioSrc = GetComponent<AudioSource>();
        jump = Resources.Load<AudioClip>("Footsteps_Grass_Jump_Start_02");
        attack = Resources.Load<AudioClip>("03_Step_grass_03");
        beHit = Resources.Load<AudioClip>("damage02");
        pickCoin = Resources.Load<AudioClip>("PickCoin");
        clickButton = Resources.Load<AudioClip>("ClickButton");
        death = Resources.Load<AudioClip>("lose02");
        enemyDeath = Resources.Load<AudioClip>("03_Claw_03");

    }

    // Update is called once per frame
    void Update()
    {
        
    }
    public static void Run()
    {
        audioSrc.PlayOneShot(run);
    }
    public static void Jump()
    {
        audioSrc.PlayOneShot(jump);
        
    }
    public static void Attack()
    {
        audioSrc.PlayOneShot(attack);

    }

    public static void BeHit()
    {
        audioSrc.PlayOneShot(beHit);

    }
    public static void PickCoin()
    {
        audioSrc.PlayOneShot(pickCoin);
    }
    public static void ClickButton()
    {
        audioSrc.PlayOneShot(clickButton);
    }

    public static void Death()
    {
        audioSrc.PlayOneShot(death);
    }
    public static void EnemyDeath()
    {
        audioSrc.PlayOneShot(enemyDeath );
    }
}
